package net.zjitc.service.impl;

import net.zjitc.dao.ProductDao;
import net.zjitc.dao.impl.ProductDaoImpl;
import net.zjitc.pojo.Product;
import net.zjitc.service.ProductService;
import net.zjitc.utils.PageBean;

import java.util.List;

/**
 * Created by Administrator on 2017/11/22.
 */
public class ProductServiceImpl implements ProductService {

    ProductDao productDao = new ProductDaoImpl();

    @Override
    public PageBean<Product> findPageBean(int page, int pageSize) {

        return productDao.findPageBean(page,pageSize);
    }

    @Override
    public int insert(Product product) {
        return productDao.insert(product);
    }

    @Override
    public int delete(int pid) {
        return productDao.delete(pid);
    }

    @Override
    public Product selectProduct(int pid) {
        return productDao.selectProduct(pid);
    }

    @Override
    public int update(Product product) {
        return productDao.update(product);
    }

    @Override
    public List<Product> findIsHot() {
        return productDao.findIsHot();
    }

    @Override
    public List<Product> findNew() {
        return productDao.findNew();
    }
}
